import I18n from 'react-native-i18n'
import en from './languages/en'
import zh from './languages/zh'
import tw from './languages/tw'
import { DeviceStorage } from "../DeviceStorage";

// DeviceStorage.get('lang').then(lang => {
//     I18n.locale = lang || 'en'
// }).catch(e => {
//     console.log(e);
// })

I18n.fallbacks = true
I18n.defaultLocale = 'tw'
// I18n.locale = 'en'
I18n.translations = {
    en,
    zh,
    tw
}

export const i18n = I18n
